package com.example.wx.other;

import lombok.Data;

/**
 * @author 姜冲/72152416
 * @version 1.0
 * @date 2021/9/27 10:05
 */
@Data
public class ResponsePageDTO<T> extends ResponseDTO<T>{

    /**
     * 当前查询页
     */
    private long page;

    /**
     * 条数
     */
    private long pageSize;

    /**
     * 总记录数
     */
    private long total;

    /**
     * 总页数
     */
    private long totalPage;

    public void setTotal(long total){
        this.total = total;
        this.totalPage = total % pageSize > 0 ? (total/pageSize + 1) : (total/pageSize);
    }
}
